<?php
class Model_event extends CI_Model
{
	function __construct()
	{
		parent::__construct();
	}
	
	function save($post)
	{
		$insert = $post;
		$insert['author'] = 'L';
		$insert['created'] = time();
		$insert['status'] = 0;
		
		$this->db->insert('event',$insert);
	}
	
	function update($post,$eid)
	{
		$update = $post;
		$update['author'] = 'L';
		$update['created'] = time();
		unset($update['eid']);
		
		$this->db->where('eid',$eid)->update('event',$update);
	}
}